import fetch from '@/utils/fetch';


// 说明：添加DMA分区流量计
// 接口：api/cb/flDmaZoneFlowmeter
// 请求类型：Post
export function addFlDmaZoneFlowmeter(obj) {
    return fetch({
        url: 'api/cb/flDmaZoneFlowmeter',
        method: 'post',
        data: obj
    });
}

// 说明：删除DMA分区流量计
// 接口：api/cb/flDmaZoneFlowmeter/{ids}
// 请求类型：Delete
export function deleteFlDmaZoneFlowmeter(idArr) {
    return fetch({
        url: 'api/cb/flDmaZoneFlowmeter/' + idArr,
        method: 'delete'
    });
}

// 说明：修改DMA分区流量计
// 接口：api/cb/flDmaZoneFlowmeter/{id}
// 请求类型：Put
export function modifyFlDmaZoneFlowmeter(id, obj) {
    return fetch({
        url: 'api/cb/flDmaZoneFlowmeter/' + id,
        method: 'put',
        data: obj
    })
}

// 说明：DMA分区流量计分页查询(条件搜索)
// 接口：api/cb/flDmaZoneFlowmeter/search/{page}/{size}
// 请求类型：Post
export function searchFlDmaZoneFlowmeter(page, size, obj) {
    return fetch({
        url: 'api/cb/flDmaZoneFlowmeter/search/'+ page +'/'+ size,
        method: 'post',
        data: obj
    });
}

// 说明：获取单个DMA分区流量计
// 接口：api/cb/flDmaZoneFlowmeter/{id}
// 请求类型：get
export function getFlDmaZoneFlowmeter(id) {
    return fetch({
        url: 'api/cb/flDmaZoneFlowmeter/' + id,
        method: 'get'
    })
}

// 说明：DMA分区流量计 导出
// 接口：api/cb/flDmaZoneFlowmeter/exprotXls
// 请求类型：get
// export function exprotXls() {
//     return fetch({
//         url: 'api/cb/flDmaZoneFlowmeter/exprotXls',
//         responseType: 'blob',
//         method: 'get'
//     })
// }

export function exprotXls(ids,obj) {
    return fetch({
        url: `/api/cb/flDmaZoneFlowmeter/exprotXls/${ids}`,
        method: 'post',
        responseType: 'blob',
        data: obj
    })
  }